<?php

/**
 * Modulo form base class.
 *
 * @package    hegeprosoft
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseModuloForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'mod_IdModulo'     => new sfWidgetFormInputHidden(),
      'mod_nombreModulo' => new sfWidgetFormInput(),
      'mod_rutaModulo'   => new sfWidgetFormInput(),
      'mod_visible'      => new sfWidgetFormInput(),
      'mod_padre'        => new sfWidgetFormInput(),
      'mod_numero'       => new sfWidgetFormInput(),
      'mod_rol'          => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'mod_IdModulo'     => new sfValidatorPropelChoice(array('model' => 'Modulo', 'column' => 'mod_IdModulo', 'required' => false)),
      'mod_nombreModulo' => new sfValidatorString(array('max_length' => 20)),
      'mod_rutaModulo'   => new sfValidatorString(array('max_length' => 200)),
      'mod_visible'      => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'mod_padre'        => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'mod_numero'       => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'mod_rol'          => new sfValidatorString(array('max_length' => 20, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('modulo[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Modulo';
  }


}
